package com.suray.rgv.son.mother.lock;

import java.util.Objects;

/**
 * 子母车任务锁
 */
public class LockContainer {
    protected Object lockKey;
    protected Object lockObj;

    public LockContainer(Object key, Object value) {
        this.lockKey = key;
        this.lockObj = value;
    }

    public Object getLockKey() {
        return lockKey;
    }

    public Object getLockObj() {
        return lockObj;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LockContainer that = (LockContainer) o;
        return Objects.equals(lockObj, that.lockObj);
    }
}
